package com.cy.sys.mapper;

import com.cy.sys.pojo.Admin;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface AdminMapper {
    /**
     * 基于用户名查询用户信息(登录时需要这个数据)
     * @param username
     * @return
     */
    @Select("select * from admin where username=#{username}")
    Admin selectUserByUsername(String username);
    /**
     * 保存用户自身信息
     * @param
     * @return
     */
    @Insert("insert into admin (username,password) values (#{username},#{password})")
    int insertUser(String username, String password);
}
